* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

html, body {
    height: 100vh;
    width: 100vw;
    background: #d9d9d9;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.img-circle{
    width:40px; height:40px;border-radius: 4px;
}

.container {
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* 功能区样式 */
.sidebar {
    width: 60px;
    min-width: 60px;
    background-color: #2e2e2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.sidebar-item {
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    background-color: #3a3a3a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #fff;
    font-size: 20px;
}

.sidebar-item:hover {
    background-color: #4a4a4a;
}

.sidebar-item.active {
    background-color: #07c160;
}

/* 会话列表样式 */
.chat-list {
    width: 240px;
    min-width: 200px;
    max-width: 300px;
    background-color: #f5f5f5;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.chat-list-header {
    height: 60px;
    background-color: #f5f5f5;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
}

.search-box {
    flex: 1;
    height: 35px;
    background-color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #e0e0e0;
}

.search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
    background: transparent;
}

.chat-list-content {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    height: 70px;
    padding: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s;
}

.chat-item:hover {
    background-color: #e8e8e8;
}

.chat-item.active {
    background-color: #e0e0e0;
}

.avatar {
    width: 45px;
    height: 45px;
    background-color: #07c160;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
}

.chat-info {
    flex: 1;
    overflow: hidden;
}

.chat-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.chat-preview {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 10px;
    color: #999;
    margin-bottom: 4px;
}

/* 聊天区域样式 */
.chat-area {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    height: 60px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.chat-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.chat-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: color 0.3s;
}

.action-btn:hover {
    color: #07c160;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    max-width: 100%;
}

.message.sent {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.message.received .message-bubble {
    background-color: #fff;
    margin-left: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.sent .message-bubble {
    background-color: #95ec69;
    margin-right: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-time {
    font-size: 10px;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

.chat-input {
    min-height: 120px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-input-resize-handle {
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
    z-index: 10;
    transition: background-color 0.2s;
}

.chat-input-resize-handle:hover {
    background-color: rgba(7, 193, 96, 0.2);
}

.chat-input-resize-handle.dragging {
    background-color: rgba(7, 193, 96, 0.4);
}

.input-tools {
    height: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tool-btn {
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: .3s;
}

.tool-btn:hover {
    color: #07c160;
}

.input-box {
    flex: 1;
    display: flex;
    gap: 10px;
}

.input-box textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: vertical;
    font-size: 14px;
    padding: 5px;
    line-height: 1.5;
    min-height: 60px;
    /* max-height: 200px; */
}

.send-btn {
    width: 80px;
    height: 30px;
    background-color: #07c160;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    align-self: flex-end;
    transition: background-color 0.3s;
    font-size: 14px;
}

.send-btn:hover {
    background-color: #06a050;
}

/* 滚动条样式 */
.chat-list-content::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-list-content::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-list-content::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-list-content::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 搜索功能样式 */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.search-results-header span {
    font-weight: bold;
    color: #333;
}

.search-results-header button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-results-header button:hover {
    color: #333;
}

.search-results-content {
    padding: 0;
}

.search-stats {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-avatar {
    width: 35px;
    height: 35px;
    background-color: #07c160;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-sender {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.result-text {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.result-time {
    font-size: 10px;
    color: #999;
}

.highlight {
    background-color: #ffeb3b;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: bold;
}

.no-results, .search-error {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.no-results i, .search-error i {
    margin-bottom: 10px;
}

.no-results p, .search-error p {
    margin: 0;
    font-size: 14px;
}

/* 消息高亮样式 */
.message.highlighted {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0% { background-color: rgba(255, 235, 59, 0.3); }
    50% { background-color: rgba(255, 235, 59, 0.6); }
    100% { background-color: transparent; }
}

/* 搜索功能样式 */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.search-results-header span {
    font-weight: bold;
    color: #333;
}

.search-results-header button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-results-header button:hover {
    color: #333;
}

.search-results-content {
    padding: 0;
}

.search-stats {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-avatar {
    width: 35px;
    height: 35px;
    background-color: #07c160;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-sender {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.result-text {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.result-time {
    font-size: 10px;
    color: #999;
}

.highlight {
    background-color: #ffeb3b;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: bold;
}

.no-results, .search-error {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.no-results i, .search-error i {
    margin-bottom: 10px;
}

.no-results p, .search-error p {
    margin: 0;
    font-size: 14px;
}

/* 消息高亮样式 */
.message.highlighted {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0% { background-color: rgba(255, 235, 59, 0.3); }
    50% { background-color: rgba(255, 235, 59, 0.6); }
    100% { background-color: transparent; }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .chat-list {
        width: 200px;
        min-width: 180px;
        max-width: 250px;
    }
    
    .message-bubble {
        max-width: 75%;
    }
}

@media (max-width: 768px) {
    .chat-list {
        width: 180px;
        min-width: 150px;
        max-width: 200px;
    }
    
    .sidebar {
        width: 50px;
        min-width: 50px;
    }
    
    .sidebar-item {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .message-bubble {
        max-width: 80%;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .chat-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .chat-list {
        width: 150px;
        min-width: 120px;
        max-width: 180px;
    }
    
    .chat-item {
        padding: 8px;
        height: 60px;
    }
    
    .avatar {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .chat-name {
        font-size: 13px;
    }
    
    .chat-preview {
        font-size: 11px;
    }
    
    .message-bubble {
        max-width: 85%;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* 标签页内容样式 */
.tab-content {
    display: none;
    height: 100%;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
}

/* 用户列表头部样式 */
.user-list-header {
    height: 60px;
    background-color: #f5f5f5;
    padding: 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

/* 用户列表内容样式 */
.user-list-content {
    flex: 1;
    overflow-y: auto;
}

.user-item {
    height: 70px;
    padding: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s;
}

.user-item:hover {
    background-color: #e8e8e8;
}

.user-info {
    flex: 1;
    overflow: hidden;
    margin-left: 10px;
}

.user-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.user-status {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-actions {
    display: flex;
    align-items: center;
}

.chat-btn {
    width: 35px;
    height: 35px;
    background-color: #07c160;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.chat-btn:hover {
    background-color: #06a050;
}

.chat-btn i {
    font-size: 14px;
}

/* 文件列表样式 */
.file-list-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-content {
    text-align: center;
    color: #999;
}

.no-content i {
    margin-bottom: 10px;
}

.no-content p {
    margin: 0;
    font-size: 14px;
}

/* 设置页面样式 */
.settings-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 默认显示区域样式 */
.default-area {
    flex: 1;
    min-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.welcome-message {
    text-align: center;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.welcome-message h2 {
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: normal;
    color: #666;
}

.welcome-message p {
    font-size: 16px;
    margin: 0;
    color: #999;
}

/* 标签页内容样式 */
.tab-content {
    display: none;
    height: 100%;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
}

/* 用户列表头部样式 */
.user-list-header {
    height: 60px;
    background-color: #f5f5f5;
    padding: 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

/* 用户列表内容样式 */
.user-list-content {
    flex: 1;
    overflow-y: auto;
}

.user-item {
    height: 70px;
    padding: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s;
}

.user-item:hover {
    background-color: #e8e8e8;
}

.user-info {
    flex: 1;
    overflow: hidden;
    margin-left: 10px;
}

.user-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.user-status {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-actions {
    display: flex;
    align-items: center;
}

.chat-btn {
    width: 35px;
    height: 35px;
    background-color: #07c160;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.chat-btn:hover {
    background-color: #06a050;
}

.chat-btn i {
    font-size: 14px;
}

/* 文件列表样式 */
.file-list-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-content {
    text-align: center;
    color: #999;
}

.no-content i {
    margin-bottom: 10px;
}

.no-content p {
    margin: 0;
    font-size: 14px;
}

/* 设置页面样式 */
.settings-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 默认显示区域样式 */
.default-area {
    flex: 1;
    min-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.welcome-message {
    text-align: center;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.welcome-message h2 {
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: normal;
    color: #666;
}

.welcome-message p {
    font-size: 16px;
    margin: 0;
    color: #999;
}

/* 基础样式 */
.message-item {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 70%;
    word-wrap: break-word;
}

.message-item.own-message {
    background-color: #007bff;
    color: white;
    margin-left: auto;
}

.message-item.other-message {
    background-color: #f1f1f1;
    color: #333;
}

.message-recalled {
    opacity: 0.6;
    font-style: italic;
    color: #999;
}

.typing-indicator {
    padding: 5px 10px;
    font-style: italic;
    color: #666;
    display: none;
}

.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.menu-item {
    padding: 8px 12px;
    cursor: pointer;
}

.menu-item:hover {
    background-color: #f5f5f5;
}